<template>
<input type="text" v-model.lazy="cityName">
</template>
<script setup>
import {ref,watch} from 'vue';

let cityName = ref('bejing');
watch(cityName,(newVal,oldVal)=>{
    console.log(newVal,oldVal);
})

</script>